package com.eshin.testcontext;

import org.springframework.cloud.context.named.NamedContextFactory;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class MyTestContextFactory extends NamedContextFactory<TestSpecification> {

	public MyTestContextFactory() {
//		自定义自动配置类
		super(TestContextAutoConfiguration.class, "testcontext", "testcontext.name");
	}

	public ITestContext getTestContextBean(String name){
		//自定义接口类型
		return getInstance(name, ITestContext.class);
	}
	@Override
	protected AnnotationConfigApplicationContext getContext(String name) {
		// TODO Auto-generated method stub
		return super.getContext(name);
	}
	
	public void setProperties(){
		
	}
}
